echo "Checking if $d1 and $d2 are the same directory."
if test \( -d $d1 -o -h $d1 \) -a \( -d $d2 -o -h $d2 \); then
FILENAME=`date`
touch $d1/$FILENAME
if test -f $d2/$FILENAME; then
rm $d1/$FILENAME
echo "Great! $d1 and $d2 are the same directory."
return 0;
fi
rm $d1/$FILENAME
ap=`alertpanel "Alert" "$d1 and $d2 are not the same directory. It is HIGHLY desirable that you merge these directories and create a symbolic link from one to the other (so that they are effectively the same directory)! Do you want to continue anyway?" "Exit" "Continue"`
if test "$ap" = "Exit"; then
echo "Merge $d1 and $d2 and create a symlink from one to the other"
echo "(so that they are effectively the same directory)."
return 1
fi
echo " "
echo "WARNING: $d1 and $d2 are not the same directory."
echo "Continuing anyway!"
echo " "
return 0
fi
if test -d $d2 -o -h $d2; then
p=`expr "$d1" : '\(.*[^/]\)/*'`
p=`expr "$p" : '\(.*\)/[^/]*'`
mkdirs $p
ln -s $d2 $d1
echo "Creating symlink $d1 --> $d2"
return 0
fi
p=`expr "$d2" : '\(.*[^/]\)/*'`
p=`expr "$p" : '\(.*\)/[^/]*'`
mkdirs $p
ln -s $d1 $d2
echo "Creating symlink $d2 --> $d1"
return 0
}
preparePackage()
{
packageName=`basename $packagePath`
packageName=`expr "$packageName" : '\(.*\)\.pkg'`
# Do this only if a prior Install hasn't been done.
if [ -f "${packagePath}/${packageName}.tar.gz" ]; then